#include <iostream>
using namespace std;

#include <getopt.h>

#include "irc.h"

#define _main_ID    "$Id$"
#define DEFAULT_SERVER	"irc.sorcery.net"
#define DEFAULT_PORT	6667
#define DEFAULT_CHANNEL	"#battledroids"
#define DEFAULT_URL		"http://www.battledroids.net/"
#define DEFAULT_OWNER	"nevdull"


void    Usage(void);
void    Version(void);

IRC *   ircnet;

int main(int argc, char ** argv)
{
    cout << "bdd - BattleDroids Daemon" << endl;
    cout << "Copyright (C) 2010 Barry Gian James. All rights reserved."<< endl;
    cout << "Open source game software. Keep it open source!" << endl;

    cout << _main_ID << endl;
    cout << endl;

    ircnet = new IRC();
    cout << "Connecting to " << DEFAULT_SERVER << ":" << DEFAULT_PORT << endl;
    int ret = ircnet->Connect(DEFAULT_SERVER,DEFAULT_PORT);
    if (ret != 1)
    {
        cout << "There was a problem connecting: " << ret << endl;
    }

    ircnet->SendNick();
    ircnet->SendUser();

    for (;;)
    {
        ircmsg * msg = ircnet->Parse();
    }



    return 0;
}

void    Usage(void)
{
    cout << "bdd -vh" << endl;
    cout << "Where:" << endl;
    cout << "\t-v\tShows version info" << endl;
    cout << "\t-h\tShows this help" << endl;
    cout << endl;
}

void	Version()
{
	
}